package org.hcyspartnoc.luoxin.pojo.dto.system;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hcyspartnoc.luoxin.common.constant.RegexpConstant;
import org.hibernate.validator.constraints.Length;

@Data
@NoArgsConstructor
public class SysUserLoginByPhoneDto {
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegexpConstant.PHONE_86, message = "手机号格式错误")
    private String phone;
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = RegexpConstant.PASSWORD, message = "密码格式错误")
    private String password;
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = RegexpConstant.MATH_CAPTCHA, message = "验证码格式错误")
    private String captcha;
    @NotBlank(message = "验证码令牌不能为空")
    @Length(min = 36, max = 36, message = "令牌格式错误")
    private String captchaKey;
}
